<template>
    <div class="myTable">
        <div v-html="htmlData"></div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            htmlData: ''
        }
    },
    mounted() {
        this.ReadHtml();
    },
    methods: {
        ReadHtml() {
            let file = "/data/Excel.html";
            fetch(file)
                .then(response => response.text())  // 将响应内容作为文本返回
                .then(data => {
                    console.log(data); // 打印文件内容
                    this.htmlData = data;
                })
                .catch(error => {
                    console.error('Error reading the file:', error);
                });
        },
    }
}
</script>

<style lang="scss" scoped>
.myTable {
    padding: 10px 10px 30px 10px;
}
</style>
